約 4,000,265 件
https://w.atwiki.jp/azounoman/pages/74.html
1480 Optimal Programs 解答例 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt = 0; while(true){ int n = sc.nextInt(); if(n==0) break; cnt++; int x[] = new int[n]; int y[] = new int[n]; for(int i=0;i n;i++){ x[i] = sc.nextInt(); } for(int i=0;i n;i++){ y[i] = sc.nextInt(); } Solver sol = new Solver(n, x, y); sol.solve(); System.out.printf("Program %d\r\n", cnt); sol.printAnswer(); System.out.println(); } } } class Solver{ int n; int[] x; int[] y; int[][] stack; int top; int[][] save1; // save of stack[][top-1] int[][] save2; // save of stack[][top-2] int[] savetop; // save of top int[] prog; int[] ans; int anslen; public Solver(int n, int[] x, int[] y) { // TODO Auto-generated constructor stub this.n = n; this.x = x; this.y = y; stack = new int[n][16]; for(int i=0;i n;i++) stack[i][0] = x[i]; top = 1; save1 = new int[10][n]; save2 = new int[10][n]; savetop = new int[10]; prog = new int[10]; ans = new int[10]; anslen = Integer.MAX_VALUE; } public void solve(){ search(0); } public void printAnswer(){ if(anslen==Integer.MAX_VALUE){ System.out.println("Impossible"); } else if(anslen==0){ System.out.println("Empty sequence"); } else{ for(int i=0;i anslen;i++){ switch(ans[i]){ case 0 System.out.print("ADD "); break; case 1 System.out.print("DIV "); break; case 2 System.out.print("DUP "); break; case 3 System.out.print("MUL "); break; case 4 System.out.print("SUB "); break; } } System.out.println(); } } public void search(int depth){ if(depth =anslen) return; if(check()){ if(depth anslen){ anslen = depth; for(int i=0;i anslen;i++) ans[i] = prog[i]; return; } } if(depth 10){ if(top =2 top + depth =9){ save(depth); prog[depth] = 0; if(add()) search(depth+1); restore(depth); prog[depth] = 1; if(div()) search(depth+1); restore(depth); prog[depth] = 2; if(dup()) search(depth+1); restore(depth); prog[depth] = 3; if(mul()) search(depth+1); restore(depth); prog[depth] = 4; if(sub()) search(depth+1); restore(depth); } else if(top =2){ save(depth); prog[depth] = 0; if(add()) search(depth+1); restore(depth); prog[depth] = 1; if(div()) search(depth+1); restore(depth); prog[depth] = 3; if(mul()) search(depth+1); restore(depth); prog[depth] = 4; if(sub()) search(depth+1); restore(depth); } else if(top + depth =8){ save(depth); prog[depth] = 2; if(dup()) search(depth+1); restore(depth); } } } public boolean add(){ if(top 2) return false; for(int i=0;i n;i++){ stack[i][top-2] = stack[i][top-1] + stack[i][top-2]; } top--; return notOverflow(); } public boolean div(){ if(top 2) return false; for(int i=0;i n;i++){ if(stack[i][top-1]==0) return false; } for(int i=0;i n;i++){ stack[i][top-2] = stack[i][top-2] / stack[i][top-1]; } top--; return notOverflow(); } public boolean dup(){ for(int i=0;i n;i++){ stack[i][top] = stack[i][top-1]; } top++; return true; } public boolean mul(){ if(top 2) return false; for(int i=0;i n;i++){ stack[i][top-2] = stack[i][top-1] * stack[i][top-2]; } top--; return notOverflow(); } public boolean sub(){ if(top 2) return false; for(int i=0;i n;i++){ stack[i][top-2] = stack[i][top-2] - stack[i][top-1]; } top--; return notOverflow(); } public boolean notOverflow(){ for(int i=0;i n;i++){ if(Math.abs(stack[i][top-1]) 30000) return false; } return true; } public boolean check(){ if(top==1){ for(int i=0;i n;i++){ if(stack[i][0]!=y[i]) return false; } return true; } return false; } public void save(int d){ savetop[d] = top; if(top==1){ for(int i=0;i n;i++) save1[d][i] = stack[i][0]; } else{ for(int i=0;i n;i++){ save1[d][i] = stack[i][top-1]; save2[d][i] = stack[i][top-2]; } } } public void restore(int d){ top = savetop[d]; if(top==1){ for(int i=0;i n;i++) stack[i][0] = save1[d][i]; } else{ for(int i=0;i n;i++){ stack[i][top-1] = save1[d][i]; stack[i][top-2] = save2[d][i]; } } } }
https://w.atwiki.jp/japanesehiphop/pages/2046.html
・ANALOG [WORKS] 2000 DRUM,PROGRAM,ANAGRAM EP(promo)(white)/V.A. DRUM,PROGRAM,ANAGRAM EP(promo)/V.A.
https://w.atwiki.jp/japanesehiphop/pages/2045.html
・ANALOG [WORKS] 2000 DRUM,PROGRAM,ANAGRAM EP(promo)(white)/V.A. DRUM,PROGRAM,ANAGRAM EP(promo)/V.A. 2005 PRIMAL WALK,SOURCE,I JUDGE(white)/V.A. PRIMAL WALK,SOURCE,I JUDGE/V.A.
https://w.atwiki.jp/memosite/pages/4.html
C,C++分かんないけど、 いきなりD言語を利用してみたり 現在 Poseidonっていう IDEをDLanguageで利用中。 ある日突然、日本語表示がおかしくなった。 みんな「□」で表示される・・・ 原因は、エディタのフォント設定が、 日本語に対応していないやつが 選択されていたためでしたが、 変えた記憶が無いのですが・・・ 取りあえず、MS P明朝にでも置き換えて解決 文字補完リスト作成?にチェックを入れること コンパイルの-w設定を有効にすること。 ※実行時Errorも見つけれることがあるっぽい 連想配列のMemo D言語のリファレンスに普通に記載あったけど、普通に見逃していたため、記載 連想配列の要素を削除するためには、 a.remove( 要素名 ) 配列の要素へのポイントを取得 p = ( 要素名 in b); ※ 存在しないときは、Nullを返す。
https://w.atwiki.jp/jfactory/pages/49.html
プログラム ウィンドウフォームアプリケーションでコンソールを使う VBのアプリケーションフレームワークを使う 外部プログラム起動 ウィンドウフォームアプリケーションでコンソールを使う プロジェクトのプロパティ→アプリケーションタブ→出力の種類をコンソールアプリケーションにする、というのは無しね。 デバッグ用の表示のためにコンソールが使いたかったので、閉じたり開いたりする必要があった。 ここに、log4netのConsoleAppenderで表示すればGood! ちなみに、フォームにTextBoxを使うのは、場合によっては不可です。別スレッドからの呼び出しでInvokeすると、平気で数ms喰われる。 public void 開く() { // コンソールが開いていなければ、 if (Win32.GetConsoleWindow() == IntPtr.Zero) { Win32.AllocConsole(); StreamWriter stdout = new StreamWriter(Console.OpenStandardOutput(), Encoding.Default); stdout.AutoFlush = true; Console.SetOut(stdout); IntPtr hWnd = Win32.GetConsoleWindow(); if (hWnd != IntPtr.Zero) { // [閉じる]ボタンの無効化 IntPtr hMenu = GetSystemMenu(hWnd, 0); RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND); } } } public void 閉じる() { // コンソールが開いていれば、 if (Win32.GetConsoleWindow() == IntPtr.Zero) { Console.SetOut(StreamWriter.Null); Win32.FreeConsole(); } } [DllImport("kernel32.dll")] public static extern Boolean AllocConsole(); [DllImport("kernel32.dll")] public static extern Boolean FreeConsole(); [DllImport("kernel32.dll")] public static extern IntPtr GetConsoleWindow(); VBのアプリケーションフレームワークを使う 2重起動処理(禁止 or 許可:引数を渡しアクティブに) 終了処理(メインフォームが消えたら終了 or 全フォームが消えたら終了) スプラッシュウィンドウ using System; using System.Collections.Generic; using System.Windows.Forms; using System.Collections.ObjectModel; using Microsoft.VisualBasic.ApplicationServices; namespace VBAppTest { internal class Program WindowsFormsApplicationBase { [STAThread] static void Main(string[] args) { //↓不要:WindowsFormsApplicationBase.EnableVisualStylesで指定 //Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Program app = new Program(); app.Run(args); } public Program() base(AuthenticationMode.Windows) { //↓Application.EnableVisualStyles(); と同じ意味?? this.EnableVisualStyles = true; //Formのプロパティ→ApplicationSettings→PropertyBindingで設定しておく //Properties.Settings.Default.Save()が自動で呼ばれるはずなのだが、 // C#のせいかうまくいかないので、Shutdownイベントに、 //「Properties.Settings.Default.Save();」と書いておく必要がある this.SaveMySettingsOnExit = false;// うまく動かない…… this.ShutdownStyle = ShutdownMode.AfterAllFormsClose; //メイン フォームが閉じた後に終了 // AfterAllFormsClose //最後のフォームが閉じた後に終了 // 起動時のイベント this.Startup += Program_Startup; // 起動時(2つ目のインスタンス)のイベント this.IsSingleInstance = true;// falseにすると、StartupNextInstanceは発生しない this.StartupNextInstance += Program_StartupNextInstance; // 終了時のイベント this.Shutdown += Program_Shutdown; } // 初期化処理の記述は、通常Startupイベントを使用するが、OnStartupをオーバーライドすることで、 // アプリケーションを起動させない事ができる protected override bool OnStartup(StartupEventArgs eventArgs) { base.OnStartup(eventArgs); //eventArgs.CommandLineでコマンドライン引数が取得できる。 return true; } // メインフォームはOnCreateMainFormで、スプラッシュウィンドウはOnCreateSplashScreenで生成しないと // メインフォームとスプラッシュウィンドウが同時に表示され、スプラッシュウィンドウが消えない protected override void OnCreateMainForm() { base.OnCreateMainForm(); // 念のためベースを呼んでおく this.MainForm = new formMain(); } protected override void OnCreateSplashScreen() { base.OnCreateSplashScreen(); // 念のためベースを呼んでおく this.MinimumSplashScreenDisplayTime = 1000; this.SplashScreen = new formSalush(); } // 初めてのインスタンス起動時のイベント void Program_Startup(object sender, StartupEventArgs e) { // e.CommandLineでコマンドライン引数を取得できる } // 2つ目のインスタンス起動時のイベント void Program_StartupNextInstance(object sender, StartupNextInstanceEventArgs e) { string cmd = ""; foreach (string str in e.CommandLine) { cmd += str + Environment.NewLine; //e.CommandLineでコマンドライン引数を取得出来る } MessageBox.Show(cmd,"引数"); } // アプリケーション終了時に発生するイベント void Program_Shutdown(object sender, EventArgs e) { Properties.Settings.Default.Save(); } } } 外部プログラム起動 using Syystem.Diagnostics; // 標準ブラウザが起動する Process.Start("http //www.yahoo.co.jp"); // 標準メーラーが起動する Process.Start("mailto xxxxx@yahoo.co.jp"); // ペイントが起動される(関連付けにより変わる) Process.Start("sample.jpg"); // メモ帳が起動される(関連付けにより変わる) Process.Start("log.txt");
https://w.atwiki.jp/childreninfksm_en/pages/52.html
【Italy】Invitation of the Recreation from Italy 【Yamanashi】Kid s Summer camp at paradise forests and lakes, July 15 to August 31 【Hokkaido】Fukushima kids camp school education to support, July 25 to August 28 【Akita】Summer time program for schoolchildren in the accommodation one week 【Hokkaido】Vacation at Touya lake, for Fukushima, Iwate, Miyagi people 【Hiroshima】Take refuge Fukushima kids to Hiroshima in summer holiday 【Ishikawa】Welcome CAMP 2011 in summer holiday!Aug,5th to Aug,19th 【Yamanashi Hokuto city】Bus tour for Fukushima kids Aug,23 to 26 【Tottori】Evacuation program in Tottori, the pony pasture,sea,nature
https://w.atwiki.jp/japanesehiphop/pages/489.html
for THA BLUE HERB ・A.K.A. DJ ONO onomono ・ANALOG [SINGLE] 2009 STRAIGHT YEARS [WORKS] 1996 THE BEST OF JAPANESE HIP HOP VOL.6 - V.A. 2000 DRUM,PROGRAM,ANAGRAM EP(promo)(white) - V.A. DRUM,PROGRAM,ANAGRAM EP(promo) - V.A. 2005 PRIMAL WALK,SOURCE,I JUDGE(white) - V.A. PRIMAL WALK,SOURCE,I JUDGE - V.A. 2006 MIDNIGHT EXPRESS(NEW DEPARTURE VERSION) - B.I.G JOE 2012 STILL STRUGGLING EP - MANTIS 2021 MOVE THE CROWD, ROCK THE HOUSE - YOU THE ROCK★
https://w.atwiki.jp/icess11/pages/26.html
ICESS-11のプログラム関連のページです。 閲覧権限はメンバー向けです。 2008.10. 17 本web pageを開設しました。 名前 コメント 過去の会議や関連する国際会議のinvited speakersのリストを作りましょう。 -- matui (2008-10-18 23 15 38) 以下は本サイト@wikiのスポンサーの広告です。
https://w.atwiki.jp/holy_shield/pages/53.html
イベントページURL Brawny Soldier Program 達成者 誰も達成できなかったため努力者5名に20A相当の報酬配布。情けなさすぎるでしょう!
https://w.atwiki.jp/memosite/pages/50.html
Program BookMark 複数 Soft Illness Sdl D C++ ActionScript http //www.yomogi.sakura.ne.jp/~si/SoftIllness/index.html SDL �(プサイ)の興味関心空間 http //ledyba.ddo.jp/2006/04/02061817.php http //shimaki-hp.hp.infoseek.co.jp/autoconf/book1.html Web Java → Ajax http //code.google.com/webtoolkit/ 使い方 http //www.atmarkit.co.jp/fwcr/rensai/googlewebtoolkit01/01.html GoogleAirth も参考 Server http //www.painfo.net/PASOCON/server2.htm